package com.ruoyi.personnel.service.impl;

import com.ruoyi.personnel.domain.WxUser;
import com.ruoyi.personnel.mapper.WechatMapper;
import com.ruoyi.personnel.service.WechatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class WechatServiceImpl implements WechatService {
    @Autowired
    public WechatMapper wechatMapper;
    @Override
    public WxUser getWxUserList(WxUser wxUser) {
        return wechatMapper.selectWxUserList(wxUser);
    }



    @Override
    public int insertWxUser(WxUser wxUser) {
        return wechatMapper.insertNewWxUser(wxUser);
    }

    @Override
    public WxUser selectWxUserByOpenId(String openId) {
        return null;
    }

    public Object checkLogin(String openid) {
        if (selectWxUserByOpenId(openid)==null){
            return false;
        }
        return true;
    }
}
